#include <iostream>

using namespace std;

int sum(int a,int b = 10);

int main(void)
{
  int x,y,z;
  x = 1;y = 2;z = 0;

  z = sum(x,y);
  cout << "z = " << z << endl;
  
  /* 这里使用默认参数 */
  z = sum(x);
  cout << "z = " << z << endl;
  return 0;
}

int sum(int a,int b)
{
  return a+b;
}